<style>
<!--
.message {
	background-color:green;
	padding:10px;
}

.orderlist{
	color:black;
	width:100%;
	border:1px;
	text-align:center;
	
}
.orderlist tr td {
	border-color:blue;
	border:1px;
}
.orderlist tr td span {
	font-size: 13px;
	font-weight:bolder;
}
-->
</style>
<div id="content" class="w920" style="color:black;padding:14px 0 14px 0;">
<?php if ($this->message){

	echo $this->message;
	
}else{
	
?>
	<h2 style="font-size:20px;font-weight:bold;margin-bottom:18px; text-align:center;">
	请填写付款单:</h2>
	<?php if($this->message){
		
		foreach( $this->message as $message){
		?>
		<div class="message"><?php echo $message;?></div>
	
	<?php 
		}
	}
	?>
	<div>
	<div class="orderlist">
			<form id="order" action="https://www.paypal.com/cgi-bin/webscr" method="post">
			
			<div style="text-align:center;">
			<span><?php echo $this->artwork->name;?></span><br/>
			<span>货号：<?php echo $this->artwork->good_num;?></span><br/>
			<span><img src="<?php echo $this->artwork->getPhotoWebAccessablePath('260x260');?>"/></span><br/>
<!--			<table>-->
<!--			<tr>-->
<!--				<td style="text-align:right;">数量:</td><td style="text-align:left;"><input type="text" name="quantity" value="1" /></td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right">币种:</td><td style="text-align:left;"><input type="text" readonly="readonly" name="currency_code" value="USD" /> </td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right;"></td> <td style="text-align:left;"></td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right;"></td><td style="text-align:left;"></td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right;"></td><td style="text-align:left;"></td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right;"></td><td style="text-align:left;"></td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right;"></td><td style="text-align:left;"></td>-->
<!--			</tr>-->
<!--			<tr>-->
<!--				<td style="text-align:right;"></td><td style="text-align:left;"></td>-->
<!--			</tr>-->
<!--			-->
<!--			-->
<!--			</table>-->
			<span>数量:<input type="text" name="quantity" value="1" /></span><br/>
			<span>币种: <input type="text" readonly="readonly" name="currency_code" value="USD" /> <!-- or EUR --></span><br/>
			<span>单价: <input type="text" readonly="readonly" name="amount" value="<?php echo $this->artwork->usd_price;?>" /> <!-- price --></span><br/>
			<span>运费:<input type="text" name="shipping" value="0" /> <!-- shipping cost --></span><br/>
			<input type="hidden" name="item_name" value="<?php echo $this->artwork->name;?>" /> <!-- artwork name -->
			<input type="hidden" name="item_number" value="<?php echo $this->artwork->good_num;?>" /> <!-- artwork id -->
			
			<input type="hidden" name="return" value="http://www.jimeiarts.com/index/thanks" /> <!-- page after completing payment -->
			<span>电邮: <input type="text" name="email" value="" /> <!-- customer email --></span><br/>
			<span>名: <input type="text" name="first_name" value="" /> <!-- first name --></span><br/>
			<span>姓: <input type="text" name="last_name" value="" /> <!-- last name --></span><br/>
			<span>电话: <input type="text" name="telephone" value="" /> <!-- last name --></span><br/>
			<span>地址: <input type="text" name="address1" value="" /> <!-- fill this --></span><br/>
		
			<span>城市: <input type="text" name="city" value="" /> <!-- fill this --></span><br/>
			<span>州/省: <input type="text" name="state" value="" /> <!-- fill this --></span><br/>
			<span>国家: <input type="text" name="country" value="" /> <!-- fill this --></span><br/>
			<span>邮编: <input type="text" name="zip" value="" /> <!-- fill this --></span><br/>
			<span>说明信息：[规格，付费等要求可在此说明]<br/>
			<textarea name="message" cols="40" > </textarea></span><br/>
		
			<input type="hidden" name="undefined_quantity" value="0" />
		
			<input type="hidden" name="no_shipping" value="1" />
			<input type="hidden" name="cmd" value="_xclick" />
			<input type="hidden" name="charset" value="utf-8" />
			<input type="hidden" name="business" value="jimeiarts@gmail.com">
			<input type="hidden" name="image_url" value="http://www.jimeiarts.com/images/logo.jpg">
			<span><input type="submit" name="submit" value="只提交订单" onclick="return submitOrder();"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="pay_now" value="马上使用Paypal付款" /></span>
			</div>
			</form>
			<script language="javascript">
				function submitOrder(){
					$("#order").attr("action","/artwork/add-order/artworkId/<?php echo $this->artwork->id;?>");
					//alert($("#order").attr("action"));
					return true;

				}
			</script>
			
			
			
			
			
			
			
	</div>
</div>
<?php }?>
</div>